<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE HTML>
<ui:composition 
	template="/dinamico/template/template.xhtml" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	 >
		<ui:define name="conteudo">
		<h:form id="formAlterarDizimo">
		<p:panel id="panelAlterarDizimo" header="#{mensagens['cabecalho.consultar.membro.dizimo.alterar']}" style="font-size:11px;text-align:left;">
			<h:panelGrid id="gridFiltro" styleClass="label"  columns="2" >
				<p:selectOneRadio id="tipoFiltro"  value="#{consultaAlterarDizimoManagedBean.tipoFiltro}" layout="custom" >
					<f:selectItem itemValue="1" itemLabel="#{mensagens['filtro.nome']}"/>
					<f:selectItem itemValue="2" itemLabel="#{mensagens['filtro.sexo']}"/>
					<f:selectItem itemValue="3" itemLabel="#{mensagens['filtro.todos']}"/>
					<p:ajax event="change" immediate="true" update="formAlterarDizimo"/>	
				</p:selectOneRadio>
			<h:panelGrid  columns="2" >
				<p:radioButton id="opt1" for="tipoFiltro" itemIndex="0"/>	
				<p:outputLabel for="opt1" value="#{mensagens['filtro.nome']}" />
				
				<p:radioButton id="opt2" for="tipoFiltro" itemIndex="1"/>	
				<p:outputLabel for="opt2" value="#{mensagens['filtro.sexo']}" />
				
				<p:radioButton id="opt3" for="tipoFiltro" itemIndex="2"/>	
				<p:outputLabel for="opt3" value="#{mensagens['filtro.todos']}" />
				</h:panelGrid>
			</h:panelGrid>	
		</p:panel>
		
		<p:panel id="panelConsultaNome"  style="font-size:11px;text-align:left;" rendered="#{consultaAlterarDizimoManagedBean.tipoFiltro eq 1}">
			<h:panelGrid columns="2" cellpadding="5" >
				<h:outputLabel styleClass="label" value="#{mensagens['filtro.label.nome']}" />
				<p:inputText value="#{consultaAlterarDizimoManagedBean.membro.nome}" size="50" maxlength="50"/>			
			</h:panelGrid>
		</p:panel>	
		
		<p:panel id="panelConsultaSexo"  style="font-size:11px;text-align:left;" rendered="#{consultaAlterarDizimoManagedBean.tipoFiltro eq 2}">
			<h:panelGrid id="gridSexo" columns="2" cellpadding="5"  >
				<h:outputLabel styleClass="label" value="#{mensagens['filtro.label.sexo']}"/>
				<p:selectOneMenu styleClass="label" value="#{consultaAlterarDizimoManagedBean.membro.sexo}">
					<f:selectItem itemLabel="Selecione" itemValue="0"/>
					<f:selectItem itemLabel="Masculino" itemValue="Masculino"/>
					<f:selectItem itemLabel="Feminino" itemValue="Feminino"/>
					<p:ajax event="change" update="panelConsultaSexo"/>	
				</p:selectOneMenu>
			</h:panelGrid>
		</p:panel>
		<div align="left">
			<h:panelGrid 
				columns="2" 
				cellpadding="5" 
				style="font-size:11px;margin-left:10px;"
				>
			
				<p:commandButton
					process="formAlterarDizimo"
					value="#{mensagens['consultar.membro.consultar']}"
					action="#{consultaAlterarDizimoManagedBean.consultarMembro()}"
					ajax="false"
				/>
				<p:commandButton
					value="#{mensagens['botao.limpar']}"
					ajax="false"
					immediate="true"
					>
					<p:resetInput target="formAlterarDizimo"/>				
				</p:commandButton>
			
		</h:panelGrid>
		</div>
		</h:form>
		</ui:define>
	</ui:composition>

